package cn.mw.cmdb.mapper;

import cn.mw.cmdb.entity.modelRelation.ModelRelate;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.neo4j.repository.Neo4jRepository;
import org.springframework.data.neo4j.repository.query.Query;
import org.springframework.stereotype.Repository;

@Repository
public interface ModelRelateMapper extends Neo4jRepository<ModelRelate,Long> {

    @Query("MATCH (n)-[r]->() WHERE ID(r)=$relateId DELETE r")
    void deleteByRelateId(@Param(value = "relateId") Long relateId);
}
